/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session.stateless;

import entity.UnstructuredContentEntity;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author WenYong
 */

@Stateless
public class StakeholderUnstructuredContentSessionBean{
@PersistenceContext
    private EntityManager entityManager;
  //  @EJB
  //  private StakeholderSessionBean stakeholderSession;

    public boolean addContent (UnstructuredContentEntity unsc)
    {
        boolean successful = true;
        UnstructuredContentEntity content = new UnstructuredContentEntity(unsc);
        //persist the stakeholder
        try {
       //     content.setStakeholder(stakeholderSession.getStakeholderById(stakeholderId));

            entityManager.persist(content);
        } catch (Exception ex) {
            successful = false;
        }
        return successful;

    }
    
}
